package GUILayer;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import java.awt.Window.Type;
import java.awt.Dialog.ModalityType;

public class Betaling extends JDialog {

	private final JPanel contentPanel = new JPanel();
	private JTextField textField;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			Betaling dialog = new Betaling();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public Betaling() {
		setModalityType(ModalityType.TOOLKIT_MODAL);
		setType(Type.POPUP);
		setAlwaysOnTop(true);
		setResizable(false);
		setBounds(100, 100, 451, 378);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);
		{
			JLabel lblSalgsinformation = new JLabel("Salgsinformation");
			lblSalgsinformation.setFont(new Font("Tahoma", Font.PLAIN, 18));
			lblSalgsinformation.setBounds(10, 11, 415, 31);
			contentPanel.add(lblSalgsinformation);
		}
		
		JTextArea textArea = new JTextArea();
		textArea.setEnabled(false);
		textArea.setEditable(false);
		textArea.setBounds(10, 39, 415, 208);
		contentPanel.add(textArea);
		
		JLabel lblIndtast = new JLabel("Indtast kontant bel\u00F8bet her");
		lblIndtast.setBounds(68, 261, 167, 14);
		contentPanel.add(lblIndtast);
		
		textField = new JTextField();
		textField.setBounds(245, 258, 180, 20);
		contentPanel.add(textField);
		textField.setColumns(10);
		
		JLabel errorPaymentLabel = new JLabel("New label");
		errorPaymentLabel.setBounds(68, 286, 46, 14);
		contentPanel.add(errorPaymentLabel);
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton cancelButton = new JButton("Annulere Betaling");
				cancelButton.setActionCommand("Cancel");
				buttonPane.add(cancelButton);
			}
			{
				JButton okButton = new JButton("Afslutning Betaling");
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
		}
	}
}
